<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title></title>
    </head>
    <body>
        <?php

        // Q1 false
        // Q2 using the keyword return
        // Q3 50
        // Q4 500 because it calls the function twice
        // Q5 500 call by value method called twice, result stored in $result
        // Q6 Below.

        function add($num1, $num2) {
            $result = $num1 + $num2;
            echo $num1 . " Plus " . $num2 . " Equals: " . $result;
            echo "<BR/>";
        }

        function multiply($num1, $num2) {
            $result = $num1 * $num2;
            echo $num1 . " Multiplied By " . $num2 . " Equals: " . $result;
            echo "<BR/>";
        }
        function divide($num1,$num2){
            $result = $num1/$num2;
            echo $num1 . " Divided By " . $num2 . " Equals: " . $result;
            echo "<BR/>";   
        }
        function subtract($num1,$num2){
            $result = $num1-$num2;
            echo $num1 . " Minus " . $num2 . " Equals: " . $result;
            echo "<BR/>";
        }
        function farenheitToCelcius($farenheitTemp){
            $temp = $farenheitTemp-32;
            $result = $temp*(5/9);
            echo $farenheitTemp . " Converted to Celcius is: " .$result;
            echo "<BR/>";           
        }
        function celciusToFarenheit($celciusTemp){
            $temp = ($celciusTemp)/0.555555555555;
            $result = $temp+32;
            echo $celciusTemp . " Converted to Farenheit is: " .$result;
            echo "<BR/>";           
        }

        add(10, 10);            // pass in two numbers to add
        multiply(10, 10);       // pass in two numbers to multiply
        divide(100,10);         // pass in numbers to divide
        subtract(100,20);       // pass in numbers to subtract
        farenheitToCelcius(95); // pass in value to convert to celcius
        celciusToFarenheit(35);  // pass in value to convert to farenheit
        ?>

    </body>
</html>
